$('body').ajaxComplete(function() {
	window.setTimeout(function() {
		$(".vitrine, .vitrineHome, .maisVistos ").find("ul > li").each(function(){
			var oldPrice = $(this).find(".oldPrice").text().replace(".", "").replace(",", ".").replace(/[^0-9\.]/g, '');
			if(oldPrice != ""){
				var newPrice = $(this).find(".newPrice span.value").text().replace(".", "").replace(",", ".").replace(/[^0-9\.]/g, '');
				var discountValue = Math.round( 100 - ((newPrice * 100)/oldPrice));
				if(!isNaN(discountValue)){
					discountValue = discountValue + '';
					if(discountValue.length == 1)
						discountValue = '0' + discountValue;
					
					$(this).append('<div class="bandeirapromo">' + discountValue + '<span><div style="font-size:16px">%</div>off</span></div>');
				}
			}
		});
	}, 2000);
});